package com.lingxu.api.ztb.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lingxu.api.ztb.mapper.Y029ZdcqMapper;
import com.lingxu.api.ztb.model.Y029Zdcq;
import com.lingxu.api.ztb.service.IY029ZdcqService;
import com.lingxu.api.ztb.model.vo.Y029ZdcqVO;



import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.core.metadata.IPage;


import lombok.extern.slf4j.Slf4j;

import javax.servlet.http.HttpServletResponse;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.UUID;

/**
 * 征地拆迁表 服务实现类
 *
 * @author admin
 * @since 2025-09-19
 */
@Slf4j
@Service
public class Y029ZdcqServiceImpl extends ServiceImpl<Y029ZdcqMapper, Y029Zdcq>  implements IY029ZdcqService {

    @Resource
    private Y029ZdcqMapper y029ZdcqMapper;

    @Transactional(readOnly = true)
    @Override
    public IPage<Y029ZdcqVO> queryPageList(Y029ZdcqVO query) {
        Page<Y029ZdcqVO> page = new Page<Y029ZdcqVO>(query.getPageNo(), query.getPageSize());
        return y029ZdcqMapper.pageList(page,query);
    }


    @Transactional(readOnly = true)
    @Override
    public List<Y029ZdcqVO> list(Y029ZdcqVO query) {
        return y029ZdcqMapper.selectY029ZdcqList(query);
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public void delete(Set<String> ids) {
        if (CollectionUtils.isNotEmpty(ids)) {
            y029ZdcqMapper.deleteBatchIds(ids);
        }
    }

}